
import React, { lazy } from 'react';
import { Navigate, RouteObject } from 'react-router-dom'
// import Discover from '@/views/discover/index'
const Discover = lazy(() => import('@/views/discover/index'))
const Recommend = lazy(() => import('@/views/discover/c-views/recommend/index'))
const Ranking = lazy(() => import('@/views/discover/c-views/ranking/index'))
const Album = lazy(() => import('@/views/discover/c-views/album/index'))
const Djradio = lazy(() => import('@/views/discover/c-views/djradio/index'))
const Artist = lazy(() => import('@/views/discover/c-views/artist/index'))
const Songs = lazy(() => import('@/views/discover/c-views/songs/index'))
const Mine = lazy(() => import('@/views/mine/index'))
const Focus = lazy(() => import('@/views/focus/index'))
const Download = lazy(() => import('@/views/download/index'))

const routes: RouteObject[] = [
  /*   {
      path: '/',
      element: <Navigate to="/discover" replace />
    }, */
  {
    path: '/discover',
    element: <Discover />,
    children: [
      {
        path: '/discover',
        element: <Navigate to="/discover/recommend" replace />
      },
      {
        path: '/discover/recommend',
        element: <Recommend />
      },
      {
        path: '/discover/ranking',
        element: <Ranking />
      },
      {
        path: '/discover/album',
        element: <Album />
      },
      {
        path: '/discover/djradio',
        element: <Djradio />
      },
      {
        path: '/discover/artist',
        element: <Artist />
      },
      {
        path: '/discover/songs',
        element: <Songs />
      }
    ]
  },
  {
    path: '/mine',
    element: <Mine />
  },
  {
    path: '/focus',
    element: <Focus />
  },
  {
    path: '/download',
    element: <Download />
  }
];


export default routes
